﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MonitorServersWeb;
using System.Drawing;

public partial class Controls_ucMessageQueue : System.Web.UI.UserControl
{
    public ServerInfo serverInfo { set; get; }
    public List<MessageQueue> Mq;
    protected void Page_Load(object sender, EventArgs e)
    {       
            GridView1.DataSource = Mq;
            GridView1.DataBind();

            if (Mq.Count < 1)
            {
                this.Visible = false;
            }
        
    }

    public Color GetStatusColor(object Messages)
    {
        if (int.Parse(Messages.ToString())>20)
        {
            return Color.Red;
        }
        else
        {
            return Color.Green;
        }
    }
}